100 SYS65517:IFPEEK(781)=22THENMT$="":TM$="":GOTO500 110 MT$="":TM$="" 500 PRINT"[147]"MT$" WARNING":PRINT" THIS PROGRAM WILL" 501 PRINT" SCRATCH[146] A FILE.":PRINT" PLEASE MAKE SURE" 502 PRINT" THAT THE GAZETTE DISK[146]":PRINTTM$" IS NOT IN THE DRIVE." 1000 FORI=1TO7000:NEXT 3999 REM END: REM PROGRAM 4, SCRATCH OR SCRATCH AND LEAVE ON DIRECTORY 4000 PRINT"[147]SELECT OPTION:" 4010 PRINT"1. COMPLETE SCRATCH" 4020 PRINT"2. SCRATCH, BUT LEAVE" 4021 PRINT" ON DIRECTORY" 4030 PRINT"WHICH ONE?" 4040 GET A$: IF A$="" THEN 4040 4050 A=VAL(A$): IF A<1 OR A>2 THEN 4040: REM REJECT INVALID INPUT 4060 IF A=1 THEN B=0: REM SET TO PERMANENTLY DELETE 4070 IF A=2 THEN B=128: REM SET TO LEAVE ON DIRECTORY 4080 INPUT"WHICH SECTOR";S$: S=VAL(S$): IF S<0 OR S>19 THEN 4080 4090 PRINT "WHAT IS THE FIRST BYTE":PRINT"OF THE FILE YOU WISH" 4091 PRINT "TO SCRATCH?" 4100 INPUT BP$: BP=VAL(BP$): REM INPUT FILE TARGET BYTE FOR SCRATCH 4110 BS=(BP=2)+(BP=34)+(BP=66)+(BP=98)+(BP=130)+(BP=162)+(BP=194)+(BP=226) 4120 IFBS<>-1THEN4100:REM REJECT INVALID INPUT 4130 OPEN 15,8,15,"I": REM OPEN COMMAND CHANNEL TO DISK 4140 OPEN8,8,8,"#": REM OPEN DIRECT ACCESS CHANNEL TO DISK 4150 PRINT#15, "U1:"8;0;18;S: REM LOAD SECTOR CONTAINING FILE TO BE SCRATCHED 4160 PRINT#15, "B-P:"8;BP: REM SET BUFFER POINTER TO TARGET ADDRESS 4170 PRINT#8, CHR$(B);: REM CHANGE TARGET FILE CODE IN CHANNEL 8 BUFFER 4180 PRINT#15,"U2:"8;0;18;S:REM RETURN CHANGED CONTENTS TO TARGET SECTOR 4190 CLOSE 8: REM CLOSE DIRECT ACCESS CHANNEL 4200 CLOSE 15: REM CLOSE COMMAND CHANNEL 4210 REM GOTO 100: REM RESTART DISPLAY T&S PROGRAM WHEN FIRST REM REMOVED